package com.wcs.exam.common.base.exception;

import lombok.Getter;
import lombok.Setter;

import java.io.Serial;

/**
 * 异常处理类
 *
 * @author wcs
 */
@Setter
@Getter
public class BaseException extends RuntimeException {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 异常码
     */
    protected int code;

    public BaseException() {
        super("系统错误");
        this.code = 9999;
    }

    public BaseException(String message) {
        super(message);
        this.code = 9999;
    }

    public BaseException(int code, String message) {
        super(message);
        this.code = code;
    }

}
